<template>
  <div class="Camera">
    <el-tooltip
      class="item"
      effect="dark"
      content="查看监控"
      placement="bottom"
    >
      <img src="../assets/nav-img/shexiangtou.svg" alt="" @click="showCamera" />
    </el-tooltip>
  </div>
</template>

<script>
export default {
  name: 'Camera',
  data() {
    return {
      flag: false,
    };
  },
  methods: {
    showCamera() {
      console.log('成功');
      this.flag == false ? (this.flag = true) : (this.flag = false);
      this.$store.commit('Camera', this.flag);
    },
  },
};
</script>
<style>
.Camera {
  width: 40px;
  position: absolute;
  top: 16px;
  right: 230px;
}
.Camera img {
  width: 40px;
  height: 40px;
  background-color: #fff;
  border-radius: 50%;
  box-shadow: 5px 5px 4px rgba(0, 0, 0, 0.6);
}
</style>
